package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.util;


import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.event.ComponentListenerAdapter;

/**
 * @author Renato Miceli
 */
public class RefresherKiller extends ComponentListenerAdapter {
	
	private final Refresher<?> timer;
	
	public RefresherKiller(Refresher<?> timer) {
		this.timer = timer;
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void onDestroy(Component component) {
		super.onDestroy(component);
		timer.defaultCancel();
	}

}
